-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
theme.json docs: add missing settings & styles #36137
Conversation
@@ -169,6 +169,9 @@ The settings section has the following structure: | |||
{ | |||
"version": 1, | |||
"settings": { | |||
"border": { | |||
"customRadius": false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This landed in WordPress 5.8.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was 5.8.1 - WordPress/wordpress-develop#1513.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, thanks for catching that. I see what happened. I think it's fine to leave it in the "WordPress" as it was a bug and should have been ported to 5.8 anyway.
However, it prompts us to improve the docs to better pin a given setting/style to a given WordPress release (we'll certainly need this for WordPress 5.9).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The handbook setup is very limited, so I wonder if we should just have different subsections per release. Something along the lines of:
- Settings
- WordPress 5.8
- WordPress 5.9
- Gutenberg
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
However, it prompts us to improve the docs to better pin a given setting/style to a given WordPress release (we'll certainly need this for WordPress 5.9).
💯 This would be useful in docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mkaz, do you have any suggestions for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For docs, I think we just need to use @since
comments similar to how we would in code. It's not quite valid JSON, but if we consider the file to be JSONC (json with comments) we could do:
"settings": {
"border": {
// @since wp5.8.1
"customRadius": false
...
I think the blockGap could use a more detailed documentation because it is not self explanatory, |
This PR updates the docs to add the undocumented settings & styles.